package cn.zh.stan.activity;

import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

import com.lzy.okhttputils.OkHttpUtils;
import com.lzy.okhttputils.callback.StringCallback;

import cn.zh.stan.BaseUrl;
import cn.zh.stan.R;
import okhttp3.Call;
import okhttp3.Request;
import okhttp3.Response;

public class Help extends BaseActivity {

    ImageView hpback;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_help);
        init();
    }
    public void init(){
        hpback= (ImageView) findViewById(R.id.hpback);
        hpback.setOnClickListener(this);
        getPost();
       }


    @Override
    public void onClick(View view) {
        super.onClick(view);
        int id=view.getId();
        switch (id){
            case R.id.hpback:
                finish();
                break;
            }
          }



    public void getPost(){
        OkHttpUtils.get(BaseUrl.GetDocPager)
                .params("pageIndex","")
                .params("pageSize","")
                .params("keywords","")
                .execute(new StringCallback() {
                    @Override
                    public void onResponse(boolean isFromCache, String s, Request request, @Nullable Response response) {
                        System.out.println("------->帮助文档内容==="+s);
                      }
                    @Override
                    public void onError(boolean isFromCache, Call call, @Nullable Response response, @Nullable Exception e) {
                        super.onError(isFromCache, call, response, e);
                    }
                 });
             }



}
